package demo.aop.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class AdviceKindTestController {

    @GetMapping("/advice") //http://localhost:8080/advice
    public String test() throws InterruptedException {
        Thread.sleep(4);
        return "ok";
    }


    @GetMapping("/advice/throwing") //http://localhost:8080/advice/throwing
    public String test2(){
        int i=1/0;
        return "ok";
    }
}
